using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class CustomValidatorPage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }


    protected void Button1_Click(object sender, EventArgs e)
    {
        if (IsValid)
        {
            lblError.Text = "Thank you for your interesting!";
        }
      

    }
    protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args)
    {        
        args.IsValid=false;
        for (int i = 0; i < chklstSurvey.Items.Count; i++)
        {
            if (chklstSurvey.Items[i].Selected)
            {
                args.IsValid=true; break;
            }            
        }
    }
}
